//
//  SHFindCarDetailCell.m
//  UI_CarHome
//
//  Created by dllo on 15/11/2.
//  Copyright (c) 2015年 沈浩. All rights reserved.
//

#import "SHFindCarDetailCell.h"
#import "SHHandle.h"
@implementation SHFindCarDetailCell

- (void)dealloc
{
    [_leftImageView release];
    [_nameLabel release];
    [_priceRangeLabel release];
    [_kindLabel release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView {
    self.leftImageView = [[UIImageView alloc] init];
    [self.contentView addSubview:self.leftImageView];
    [_leftImageView release];
  
    
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nameLabel];
    [_nameLabel release];
   
    self.nameLabel.textAlignment = NSTextAlignmentLeft;
    self.nameLabel.textColor = TEXTCOLOR;
    
    self.priceRangeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.priceRangeLabel];
    [_priceRangeLabel release];
    self.priceRangeLabel.textColor = [UIColor redColor];
    
    self.kindLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.kindLabel];
    [_kindLabel release];
    self.kindLabel.textAlignment = NSTextAlignmentLeft;
    self.kindLabel.textColor = [UIColor grayColor];
    self.kindLabel.font = [UIFont systemFontOfSize:10];
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.leftImageView.frame = CGRectMake(10 * WID, 5 * HEI, 90 * WID, 70 * HEI);
    
    self.nameLabel.frame = CGRectMake(110 * WID, 5 * HEI, 120 * WID, 30 * HEI);
    
    self.priceRangeLabel.frame = CGRectMake(110 * WID, 35 * HEI, 140 * WID, 20 * HEI);
    
    self.kindLabel.frame = CGRectMake(110 * WID, 55 * HEI, 50 * WID, 20 * HEI);
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
